#pragma once

#include "DLL.h"
#include <iostream>

namespace My {

/**
 * A value from 0 to 1 measured in percents
 * Template parameter D is the number of decimal digits after decimal point.
 */
template <int D = 0> 
class DLL_API Percent {
public:
	Percent(float value = 0);
	Percent(const Percent &);
public:
	operator float() const;
	Percent & operator = (float value);
private:
	float	m_Value;
};

template <int D>
DLL_API std::ostream & operator << (std::ostream &, const Percent<D> &);
template <int D>
DLL_API std::istream & operator >> (std::istream &, Percent<D> &);

} // My